﻿using System;


namespace Inaction.Message
{
    #region MessageInfo
    [Serializable]
    public abstract class MessageInfo
    {
        public object Content { get; set; }
        public string Sender { get; set; }

        public override string ToString()
        {
            return Content == null ? string.Empty : Content.ToString();
        }
    }
    public class StringMessage : MessageInfo
    {

        public string Message
        {
            get { return Content.ToString(); }
            set { Content = value; }
        }

        public StringMessage() { }

        public StringMessage(string message)
        {
            Message = message;
        }

        public override string ToString()
        {
            return Message;
        }
    }
    #endregion
}
